<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>change_weather</title>
  </head>

  <body>
    <!-- 准备好一个“容器” -->
    <div id="test"></div>
    <div id="test2"></div>

    <!-- 引入react核心库 -->
    <script type="text/javascript" src="js/react.development.js"></script>
    <!-- 引入react-dom，用于支持react操作DOM -->
    <script type="text/javascript" src="js/react-dom.development.js"></script>
    <!-- 引入babel，用于将jsx转为js -->
    <script type="text/javascript" src="js/babel.min.js"></script>
    <!-- <script src="./change_weather.js"></script> -->
  </body>
  <script type="text/babel">
    class Person extends React.Component {
      render() {
        console.log(this);
        const { name, sex, age } = this.props;
        return (
          <ul>
            <li>{name}</li>
            <li>{sex}</li>
            <li>{age}</li>
          </ul>
        );
      }
    }
    ReactDOM.render(<Person name='michael' age='1' sex='man'/>,document.getElementById('test'))
    ReactDOM.render(<Person name='minny' age='12' sex='woman'/>,document.getElementById('test2'))
  </script>
</html>
